﻿@model BugTracker.Models.Project
@{
    ViewBag.Title = "EditProject";
    Layout = "~/Views/Shared/_LayoutAdmin.cshtml";
    
}
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.ui.datepicker.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery-ui-1.8.11.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.ui.datepicker.min.js")" type="text/javascript"></script>

	<script type='text/javascript'>
	    $(document).ready(function () {
	        $(".datePicker").datepicker({
	            showAnim: 'slideDown',
	            currentText: 'Now',
	            
	            changeMonth: true,
	            changeYear: true,
	            showButtonPanel: true,
	            yearRange: '1900:2030'

	        });
	    });
</script>

@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    
<fieldset>
<br />
             @Html.HiddenFor(model => model.project_idPK )

<br />
<br /> 
        <div class="display-label"><b>Project Name:</b></div>
        <div class="editor-field">
            @Html.EditorFor(model => model.project_name)
            @Html.ValidationMessageFor(model => model.project_name)
        </div>

<br />   
        <div class="display-label"><b>Task Assigned:</b></div>
<br />
            @Html.DropDownListFor(model => model.task_assign,
             new SelectList(ViewData["Tasks"] as System.Collections.IEnumerable,
             "task_assignName ", "task_assignName "))

<br /> 
<br /> 
        <div class="display-label"><b>Assigned to: (Developer)</b></div>
<br />
            @Html.DropDownListFor(model => model.developer_assignID,
            new SelectList(ViewData["Developer"] as System.Collections.IEnumerable,
            "user_idPK", "last_name"))

<br /> 
<br /> 
        <div class="display-label"><b>Assigned to: (QA)</b></div>
<br />
           @Html.DropDownListFor(model => model.qa_assignID,
            new SelectList(ViewData["QA"] as System.Collections.IEnumerable,
            "user_idPK", "last_name"))

<br />
 <br />
        <div class="display-label"><b>Descrpition:</b></div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.project_description, new { @style = "resize: none;", @cols = 50, @rows = 10 })
            @Html.ValidationMessageFor(model => model.project_description)
        </div>

<br />
        <div class="display-label"><b>Date Created</b></div>
        <div class="datefield">
            @Html.TextBoxFor(model => model.project_datecreated, new { @disabled = "disabled" })
            @Html.ValidationMessageFor(model => model.project_datecreated)
        </div>

<br />
         <div class="display-label"><b>Deadline:</b></div>
         <div class="datefield">
            @Html.EditorFor(model => model.project_deadline)
            @Html.ValidationMessageFor(model => model.project_deadline)
        </div>

<br />
        <div class="display-label"><b> Status:</b></div>
<br />
        <div class="editor-field">
           @Html.DropDownListFor(model => model.status_id,
            new SelectList(ViewData["Status"] as System.Collections.IEnumerable,
            "status_id", "status_name"))
<br />
<br />
       </div>

<p>
        <input type="submit" value="Save" />
</p>

<div>
    @Html.ActionLink("Back to List", "Project")
</div>

<br />
<br />
</fieldset> 
}


